<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>promise</title>
</head>
<body>
<script type="text/javascript">
const promise01 = new Promise((resolve, reject) => {
	setTimeout(() => {
		resolve();
	}, 200);
});
promise01.then((val) => {
	console.log(11);
},(err) => {
	
}).then((val) => {
	console.log(12);
},(err) => {
	
});

const promise02 = new Promise((resolve, reject) => {
	setTimeout(() => {
		resolve();
	}, 400);
});
promise02.then((val) => {
	console.log(21);
},(err) => {
	
}).then((val) => {
	console.log(22);
},(err) => {
	
});

const promise03 = new Promise((resolve, reject) => {
	setTimeout(() => {
		resolve();
	}, 800);
});
promise03.then((val) => {
	console.log(31);
},(err) => {
	
}).then((val) => {
	console.log(32);
},(err) => {
	
});

Promise.all([promise01, promise02, promise03]).then(() => {
	console.log(999);
});
</script>
<script type="text/javascript">
</script>
</body>
</html>